package com.kj.tms.system.service.basicinfo.dao;


import com.kj.tms.common.bean.dao.BaseMapper;
import com.kj.tms.pri.system.basicinfo.dto.ShareholderDto;
import com.kj.tms.pri.system.basicinfo.dto.TaxIdentifyDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ProjectName:
 * @Package: com.kj.tms.system.service.basicinfo.dao
 * @ClassName: TaxIdentifyMapper
 * @Description: 税种鉴定dao类
 * @Author: 董世栋
 * @CreateDate:
 * @UpdateUser:
 * @UpdateDate:
 * @UpdateRemark:
 * @Version: 1.0
 * Copyright: 北京宏图天安 Copyright (c) 2017
 */
@Repository
public interface TaxIdentifyMapper extends BaseMapper<TaxIdentifyDto> {

    /**
     * @param record
     * @return int
     * @throws
     * @method insert
     * @description 添加数据
     * @author dongshidong
     * @version 1.0
     * @date 2017/11/08 9:38
     */
    int insert(TaxIdentifyDto record);

    /**
     * @param list
     * @return int
     * @throws
     * @method batchInsert
     * @description 批量插入
     * @author dongshidong
     * @version 1.0
     * @date 2017/11/08 9:38
     */
    int batchInsert(List list);

    /**
     * @param list
     * @return int
     * @throws
     * @method batchInsertShareholder
     * @description 批量插入股东信息
     * @author yangruidong
     * @version 1.0
     * @date 2018/3/20 9:38
     */
    int batchInsertShareholder(List<ShareholderDto> list);

    /**
     * @param record
     * @return int
     * @throws
     * @method updateByPrimaryKey
     * @description 更新数据
     * @author dongshidong
     * @version 1.0
     * @date 2017/11/08 9:38
     */
    int updateByPrimaryKey(TaxIdentifyDto record);

    /**
     * @Method getByPrimaryKey
     * @Param taxpayersInfoId
     * @Return TaxIdentifyDto
     * @Exception
     * @Description 通过纳税主体id查询税种鉴定信息
     * @Author dsd
     * @Version 1.0
     * @Date 2017/11/23 11:37
     */
    List<TaxIdentifyDto> getByPrimaryKey(@Param("taxpayersInfoId") String taxpayersInfoId);

    /**
     * @Method deleteByPrimaryKey
     * @Param taxpayersInfoId 纳税主体id
     * @Return
     * @Exception
     * @Description [通过纳税主体id删除税种鉴定信息]
     * @Author dsd
     * @Version 1.0
     * @Date 2017/11/29 11:28
     */
    void deleteByPrimaryKey(@Param("taxpayersInfoId") String taxpayersInfoId);
    /**
     * @Method      judgeIsParent
     * @Description 判断是否为分支机构
     * @Author      [yangruidong]
     * @Version     1.0
     * @Param orgCode 机构代码，taxCode 税种
     * @Return
     * @Exception
     * @Date        2017/12/19 11:08
     */
    TaxIdentifyDto judgeIsParent(@Param("orgCode") String orgCode, @Param("taxCode") String taxCode);
}

